﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Diagnostics.Tracing;

namespace Architecture.CrossCutting.Tools
{
    [EventSource(Name ="ArchitectureTracing")]
    public class TracingMethodEventSource : EventSource
    {

        public static TracingMethodEventSource Log = new TracingMethodEventSource();

        [Event(1, Level=EventLevel.Informational, Message ="Start Method : {0}", Opcode =EventOpcode.Start)]
        public void BeginMethod(string methodName)
        {
            if (this.IsEnabled())
            {
                this.WriteEvent(1, methodName);
            }
        }
    }
}
